import * as types from '../types'
import {Tools} from "../../lib/tools";

const state = {
    inputValue: "",
    nextBtnDisabled: true,
    imgurl1:require('@/assets/ShopPhoto/u117.png'),
    imgurl2:require('@/assets/ShopPhoto/u118.png'),
    doorHeadPhotoPath:'',
    doorHeadPhotoSize:'',
    indoorPhotosPath:'',
    indoorPhotosSize:'',
    shopPhoto1:"",
    shopPhoto2:"",
    shopPhoto3:"",
}

const getters = {}

const actions = {}

const mutations = {
    [types.GET_SHOP_INPUT](state,value) {
        state.inputValue = value
    },
    [types.SHOPPHOTO_NEXT_BUTTON_CHECK](state) {
        if (Tools.check.isEmpty(state.inputValue)||
        Tools.check.isEmpty(state.doorHeadPhotoPath)||
        Tools.check.isEmpty(state.indoorPhotosPath)) {
            state.nextBtnDisabled = true
        } else state.nextBtnDisabled = false
    }
}

export default {
    namespaced: true,
    state,
    actions,
    mutations,
    getters
}